package com.k.base.jdk.stream.listquchongfu.quchong1;

import java.util.Objects;

public class PersonOne {
    private String groupId;
    private String number;
    private String name;
    private Integer age;

    public PersonOne(String groupId, String number, String name, Integer age) {
        this.groupId = groupId;
        this.number = number;
        this.name = name;
        this.age = age;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        PersonOne personOne = (PersonOne) o;
        return Objects.equals(groupId, personOne.groupId) && Objects.equals(number, personOne.number) && Objects.equals(name, personOne.name) && Objects.equals(age, personOne.age);
    }

    @Override
    public int hashCode() {
        return Objects.hash(groupId, number, name, age);
    }

    public String getGroupId() {
        return groupId;
    }

    public void setGroupId(String groupId) {
        this.groupId = groupId;
    }

    public String getNumber() {
        return number;
    }

    public void setNumber(String number) {
        this.number = number;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public Integer getAge() {
        return age;
    }

    public void setAge(Integer age) {
        this.age = age;
    }

    @Override
    public String toString() {
        return "PersonOne{" +
                "groupId='" + groupId + '\'' +
                ", number='" + number + '\'' +
                ", name='" + name + '\'' +
                ", age=" + age +
                '}';
    }
}
